var app = getApp();
var WxParse = require('../../../../lib/wxParse/wxParse.js');
var util = require('../../../../utils/util.js');
var api = require('../../../../config/api.js');

Page({
  data: {
    id: 0,
    specialshow: {},
    specialshowList: [],
    specialshowGoods: []
  },
  onShareAppMessage: function () {
    let that = this;
    let memberUserid = wx.getStorageSync('memberUserid');
    return {
      title: "fasdfasdff",
      desc: that.data.goods.goodsname,
      path: '/pages/home/home?page=specialshowDetail,' + that.data.id + '&shareMemberUserid=' + memberUserid
    }
  },
  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数
    var that = this;
    that.setData({
      id: options.id
    });

    util.request(api.SpecialshowDetail, {
      id: that.data.id
    }).then(function (res) {
      if (res.result == 1) {
        that.setData({
          specialshow: res.data.specialShow,
          specialshowGoods: res.data.specialShowGoodsList
        });
      }
    });
  },

  onReady: function () {

  },
  onShow: function () {

  },
  onHide: function () {
    // 页面隐藏

  },
  onUnload: function () {
    // 页面关闭

  }
})